Integrand size = 31, antiderivative size = 266 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^5} \, dx=\frac {5 a^3 (4 c-3 d) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{4 (c-d)^{3/2} (c+d)^{9/2} f}-\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}+\frac {a (4 c-3 d) (a+a \sec (e+f x))^2 \tan (e+f x)}{12 (c-d) (c+d)^2 f (c+d \sec (e+f x))^3}-\frac {5 a^3 (4 c-3 d) \tan (e+f x)}{24 d (c+d)^3 f (c+d \sec (e+f x))^2}+\frac {5 a^3 (4 c-3 d) (c+4 d) \tan (e+f x)}{24 (c-d) d (c+d)^4 f (c+d \sec (e+f x))} \]
[Out]
Time = 0.37 (sec) , antiderivative size = 327, normalized size of antiderivative = 1.23, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {4072, 98, 96, 95, 211} \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^5} \, dx=-\frac {5 a^4 (4 c-3 d) \tan (e+f x) \arctan \left (\frac {\sqrt {c+d} \sqrt {a \sec (e+f x)+a}}{\sqrt {c-d} \sqrt {a-a \sec (e+f x)}}\right )}{4 f (c-d)^{3/2} (c+d)^{9/2} \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}+\frac {5 a^3 (4 c-3 d) \tan (e+f x)}{8 f (c-d) (c+d)^4 (c+d \sec (e+f x))}+\frac {5 (4 c-3 d) \tan (e+f x) \left (a^3 \sec (e+f x)+a^3\right )}{24 f (c-d) (c+d)^3 (c+d \sec (e+f x))^2}-\frac {d \tan (e+f x) (a \sec (e+f x)+a)^3}{4 f \left (c^2-d^2\right ) (c+d \sec (e+f x))^4}+\frac {a (4 c-3 d) \tan (e+f x) (a \sec (e+f x)+a)^2}{12 f (c-d) (c+d)^2 (c+d \sec (e+f x))^3} \]
[In]
[Out]
Rule 95
Rule 96
Rule 98
Rule 211
Rule 4072
Rubi steps \begin{align*} \text {integral}& = -\frac {\left (a^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(a+a x)^{5/2}}{\sqrt {a-a x} (c+d x)^5} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}-\frac {\left (a^2 (4 c-3 d) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(a+a x)^{5/2}}{\sqrt {a-a x} (c+d x)^4} \, dx,x,\sec (e+f x)\right )}{4 \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}+\frac {a (4 c-3 d) (a+a \sec (e+f x))^2 \tan (e+f x)}{12 (c-d) (c+d)^2 f (c+d \sec (e+f x))^3}-\frac {\left (5 a^3 (4 c-3 d) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(a+a x)^{3/2}}{\sqrt {a-a x} (c+d x)^3} \, dx,x,\sec (e+f x)\right )}{12 (c+d) \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}+\frac {a (4 c-3 d) (a+a \sec (e+f x))^2 \tan (e+f x)}{12 (c-d) (c+d)^2 f (c+d \sec (e+f x))^3}+\frac {5 (4 c-3 d) \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{24 (c-d) (c+d)^3 f (c+d \sec (e+f x))^2}-\frac {\left (5 a^4 (4 c-3 d) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {\sqrt {a+a x}}{\sqrt {a-a x} (c+d x)^2} \, dx,x,\sec (e+f x)\right )}{8 (c+d)^2 \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}+\frac {a (4 c-3 d) (a+a \sec (e+f x))^2 \tan (e+f x)}{12 (c-d) (c+d)^2 f (c+d \sec (e+f x))^3}+\frac {5 (4 c-3 d) \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{24 (c-d) (c+d)^3 f (c+d \sec (e+f x))^2}+\frac {5 a^3 (4 c-3 d) \tan (e+f x)}{8 (c-d) (c+d)^4 f (c+d \sec (e+f x))}-\frac {\left (5 a^5 (4 c-3 d) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} \sqrt {a+a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{8 (c+d)^3 \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}+\frac {a (4 c-3 d) (a+a \sec (e+f x))^2 \tan (e+f x)}{12 (c-d) (c+d)^2 f (c+d \sec (e+f x))^3}+\frac {5 (4 c-3 d) \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{24 (c-d) (c+d)^3 f (c+d \sec (e+f x))^2}+\frac {5 a^3 (4 c-3 d) \tan (e+f x)}{8 (c-d) (c+d)^4 f (c+d \sec (e+f x))}-\frac {\left (5 a^5 (4 c-3 d) \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{a c-a d-(-a c-a d) x^2} \, dx,x,\frac {\sqrt {a+a \sec (e+f x)}}{\sqrt {a-a \sec (e+f x)}}\right )}{4 (c+d)^3 \left (c^2-d^2\right ) f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = -\frac {5 a^4 (4 c-3 d) \arctan \left (\frac {\sqrt {c+d} \sqrt {a+a \sec (e+f x)}}{\sqrt {c-d} \sqrt {a-a \sec (e+f x)}}\right ) \tan (e+f x)}{4 (c-d)^{3/2} (c+d)^{9/2} f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {d (a+a \sec (e+f x))^3 \tan (e+f x)}{4 \left (c^2-d^2\right ) f (c+d \sec (e+f x))^4}+\frac {a (4 c-3 d) (a+a \sec (e+f x))^2 \tan (e+f x)}{12 (c-d) (c+d)^2 f (c+d \sec (e+f x))^3}+\frac {5 (4 c-3 d) \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{24 (c-d) (c+d)^3 f (c+d \sec (e+f x))^2}+\frac {5 a^3 (4 c-3 d) \tan (e+f x)}{8 (c-d) (c+d)^4 f (c+d \sec (e+f x))} \\ \end{align*}
Time = 6.45 (sec) , antiderivative size = 274, normalized size of antiderivative = 1.03 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^5} \, dx=\frac {a^3 \left (-\frac {120 (4 c-3 d) \text {arctanh}\left (\frac {(-c+d) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{\sqrt {c^2-d^2}}-\frac {\left (-72 c^4-478 c^3 d+336 c^2 d^2+28 c d^3+336 d^4+\left (-296 c^4-84 c^3 d-577 c^2 d^2+984 c d^3+198 d^4\right ) \cos (e+f x)+\left (-72 c^4-470 c^3 d+384 c^2 d^2+200 c d^3+48 d^4\right ) \cos (2 (e+f x))-88 c^4 \cos (3 (e+f x))+36 c^3 d \cos (3 (e+f x))+37 c^2 d^2 \cos (3 (e+f x))+24 c d^3 \cos (3 (e+f x))+6 d^4 \cos (3 (e+f x))\right ) \sin (e+f x)}{(d+c \cos (e+f x))^4}\right )}{96 (c-d) (c+d)^4 f} \]
[In]
[Out]
Time = 1.70 (sec) , antiderivative size = 303, normalized size of antiderivative = 1.14
method | result | size |
derivativedivides | \(\frac {16 a^{3} \left (\frac {-\frac {5 \left (4 c -3 d \right ) \left (c^{2}-2 c d +d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{64 \left (c^{4}+4 c^{3} d +6 c^{2} d^{2}+4 c \,d^{3}+d^{4}\right )}+\frac {55 \left (c -d \right ) \left (4 c -3 d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{192 \left (c^{3}+3 c^{2} d +3 c \,d^{2}+d^{3}\right )}-\frac {73 \left (4 c -3 d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{192 \left (c^{2}+2 c d +d^{2}\right )}+\frac {\left (44 c -49 d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{64 \left (c +d \right ) \left (c -d \right )}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )^{4}}+\frac {5 \left (4 c -3 d \right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{64 \left (c^{5}+3 c^{4} d +2 c^{3} d^{2}-2 c^{2} d^{3}-3 c \,d^{4}-d^{5}\right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{f}\) | \(303\) |
default | \(\frac {16 a^{3} \left (\frac {-\frac {5 \left (4 c -3 d \right ) \left (c^{2}-2 c d +d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{64 \left (c^{4}+4 c^{3} d +6 c^{2} d^{2}+4 c \,d^{3}+d^{4}\right )}+\frac {55 \left (c -d \right ) \left (4 c -3 d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{192 \left (c^{3}+3 c^{2} d +3 c \,d^{2}+d^{3}\right )}-\frac {73 \left (4 c -3 d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{192 \left (c^{2}+2 c d +d^{2}\right )}+\frac {\left (44 c -49 d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{64 \left (c +d \right ) \left (c -d \right )}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )^{4}}+\frac {5 \left (4 c -3 d \right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{64 \left (c^{5}+3 c^{4} d +2 c^{3} d^{2}-2 c^{2} d^{3}-3 c \,d^{4}-d^{5}\right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{f}\) | \(303\) |
risch | \(\text {Expression too large to display}\) | \(1235\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 828 vs. \(2 (247) = 494\).
Time = 0.36 (sec) , antiderivative size = 1714, normalized size of antiderivative = 6.44 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^5} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^5} \, dx=a^{3} \left (\int \frac {\sec {\left (e + f x \right )}}{c^{5} + 5 c^{4} d \sec {\left (e + f x \right )} + 10 c^{3} d^{2} \sec ^{2}{\left (e + f x \right )} + 10 c^{2} d^{3} \sec ^{3}{\left (e + f x \right )} + 5 c d^{4} \sec ^{4}{\left (e + f x \right )} + d^{5} \sec ^{5}{\left (e + f x \right )}}\, dx + \int \frac {3 \sec ^{2}{\left (e + f x \right )}}{c^{5} + 5 c^{4} d \sec {\left (e + f x \right )} + 10 c^{3} d^{2} \sec ^{2}{\left (e + f x \right )} + 10 c^{2} d^{3} \sec ^{3}{\left (e + f x \right )} + 5 c d^{4} \sec ^{4}{\left (e + f x \right )} + d^{5} \sec ^{5}{\left (e + f x \right )}}\, dx + \int \frac {3 \sec ^{3}{\left (e + f x \right )}}{c^{5} + 5 c^{4} d \sec {\left (e + f x \right )} + 10 c^{3} d^{2} \sec ^{2}{\left (e + f x \right )} + 10 c^{2} d^{3} \sec ^{3}{\left (e + f x \right )} + 5 c d^{4} \sec ^{4}{\left (e + f x \right )} + d^{5} \sec ^{5}{\left (e + f x \right )}}\, dx + \int \frac {\sec ^{4}{\left (e + f x \right )}}{c^{5} + 5 c^{4} d \sec {\left (e + f x \right )} + 10 c^{3} d^{2} \sec ^{2}{\left (e + f x \right )} + 10 c^{2} d^{3} \sec ^{3}{\left (e + f x \right )} + 5 c d^{4} \sec ^{4}{\left (e + f x \right )} + d^{5} \sec ^{5}{\left (e + f x \right )}}\, dx\right ) \]
[In]
[Out]
Exception generated. \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^5} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 601 vs. \(2 (247) = 494\).
Time = 0.48 (sec) , antiderivative size = 601, normalized size of antiderivative = 2.26 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^5} \, dx=\frac {\frac {15 \, {\left (4 \, a^{3} c - 3 \, a^{3} d\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, c + 2 \, d\right ) + \arctan \left (-\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c^{2} + d^{2}}}\right )\right )}}{{\left (c^{5} + 3 \, c^{4} d + 2 \, c^{3} d^{2} - 2 \, c^{2} d^{3} - 3 \, c d^{4} - d^{5}\right )} \sqrt {-c^{2} + d^{2}}} - \frac {60 \, a^{3} c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 225 \, a^{3} c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 315 \, a^{3} c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 195 \, a^{3} c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 45 \, a^{3} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 220 \, a^{3} c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 385 \, a^{3} c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 55 \, a^{3} c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 385 \, a^{3} c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 165 \, a^{3} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 292 \, a^{3} c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 73 \, a^{3} c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 511 \, a^{3} c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 73 \, a^{3} c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 219 \, a^{3} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 132 \, a^{3} c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 249 \, a^{3} c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 45 \, a^{3} c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 309 \, a^{3} c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 147 \, a^{3} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (c^{5} + 3 \, c^{4} d + 2 \, c^{3} d^{2} - 2 \, c^{2} d^{3} - 3 \, c d^{4} - d^{5}\right )} {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c - d\right )}^{4}}}{12 \, f} \]
[In]
[Out]
Time = 17.09 (sec) , antiderivative size = 385, normalized size of antiderivative = 1.45 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^5} \, dx=\frac {\frac {55\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (4\,a^3\,c^2-7\,a^3\,c\,d+3\,a^3\,d^2\right )}{12\,{\left (c+d\right )}^3}-\frac {73\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (4\,a^3\,c-3\,a^3\,d\right )}{12\,{\left (c+d\right )}^2}-\frac {5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (4\,a^3\,c^3-11\,a^3\,c^2\,d+10\,a^3\,c\,d^2-3\,a^3\,d^3\right )}{4\,{\left (c+d\right )}^4}+\frac {a^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (44\,c-49\,d\right )}{4\,\left (c+d\right )\,\left (c-d\right )}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (6\,c^4-12\,c^2\,d^2+6\,d^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (-4\,c^4-8\,c^3\,d+8\,c\,d^3+4\,d^4\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (4\,c^4-8\,c^3\,d+8\,c\,d^3-4\,d^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (c^4-4\,c^3\,d+6\,c^2\,d^2-4\,c\,d^3+d^4\right )+4\,c\,d^3+4\,c^3\,d+c^4+d^4+6\,c^2\,d^2\right )}+\frac {5\,a^3\,\mathrm {atanh}\left (\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\sqrt {c-d}}{\sqrt {c+d}}\right )\,\left (4\,c-3\,d\right )}{4\,f\,{\left (c+d\right )}^{9/2}\,{\left (c-d\right )}^{3/2}} \]
[In]
[Out]